import loadDialog from './service/load-dialog'

export { loadDialog }

// import Card from './components/Card.vue'
// import Box from './components/Box.vue'
// import Action from './components/Action.vue'
// import Info from './components/Info.vue'
// import InfoItem from './components/InfoItem.vue'
// import Breadcrumb from './components/Breadcrumb.vue'
// import Form from './components/Form.vue'
// import FormItem from './components/FormItem.vue'
// import FormGroup from './components/FormGroup.vue'

const components = [
  { name: 'Card', component: defineAsyncComponent(() => import('./components/Card.vue')) },
  { name: 'Box', component: defineAsyncComponent(() => import('./components/Box.vue')) },
  { name: 'Action', component: defineAsyncComponent(() => import('./components/Action.vue')) },
  { name: 'Info', component: defineAsyncComponent(() => import('./components/Info.vue')) },
  { name: 'InfoItem', component: defineAsyncComponent(() => import('./components/InfoItem.vue')) },
  { name: 'Breadcrumb', component: defineAsyncComponent(() => import('./components/Breadcrumb.vue')) },
  // { name: 'Form', component: defineAsyncComponent(() => import('./components/Form.vue')) },
  { name: 'FormItem', component: defineAsyncComponent(() => import('./components/FormItem.vue')) },
  { name: 'FormGroup', component: defineAsyncComponent(() => import('./components/FormGroup.vue')) },
  { name: 'Page', component: defineAsyncComponent(() => import('./components/Page.vue')) },
  { name: 'Input', component: defineAsyncComponent(() => import('./components/Input.vue')) },
  // { name: 'Card', component: Card },
  // { name: 'Box', component: Box },
  // { name: 'Action', component: Action },
  // { name: 'Info', component: Info },
  // { name: 'InfoItem', component: InfoItem },
  // { name: 'Breadcrumb', component: Breadcrumb },
  // { name: 'Form', component: Form },
  // { name: 'FormItem', component: FormItem },
  // { name: 'FormGroup', component: FormGroup },
]

export default {
  install(app) {
    components.forEach(item => {
      const { name, component } = item
      const componentName = 'At' + name
      app.component(componentName, component)
    })
  },
}
